#pragma once
#include "Mesh.h"
// Debug graphics header
#include "XAnimator\DebugGraphics.h"

class GameObject
{
public:
	GameObject(LPDIRECT3DDEVICE9 device);
	GameObject(LPDIRECT3DDEVICE9 device,float X, float Y, float Z, float YROT);
	~GameObject(void);

	void loadModel(LPDIRECT3DDEVICE9 _device);
	void loadModelXA(IXAnimator *XAnim, LPDIRECT3DDEVICE9 _device,std::string modelFile);
	void Render();
	void RenderXA();
	void UpdateBoundingBoxes();
	// position
	float x,y,z;
	float Yrot;
	// collision radius for collision with other objects
	float Radius;	
	Mesh Model;
	D3DXVECTOR3 BoundingBox[8], AABoundingBox[2];
	IXAnimator *XAnimator_;
	LPDIRECT3DDEVICE9 _device;
private:
	D3DXVECTOR3 ObjectBoundingBoxCorners[8];

};

